package com.example.htmlspringtest.service.impl;

import com.example.htmlspringtest.dao.MenuMapper;
import com.example.htmlspringtest.entity.oTestMenu;
import com.example.htmlspringtest.service.IsMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @belongsProject: HTML-Spring-test
 * @belongsPackage: com.example.htmlspringtest.service.impl
 * @author: dongmufengchun
 * @createTime: 2022-06-19  19:46
 * @description: TODO
 * @version: 1.0
 */
@Service
public class MenuServiceImpl extends IsMenuService {

    @Autowired
    MenuMapper mapper;

    /**
     * 功能简介: 查询
     * @Author dongmufengchun
     * @Date 19:49 2022/6/19
     * @return java.util.List<com.example.htmlspringtest.entity.oTestMenu>
    **/
    @Override
    public List<oTestMenu> findList() {
        return mapper.list();
    }

    /**
     * 功能简介: 添加
     * @Author dongmufengchun
     * @Date 19:49 2022/6/19
     * @param oTestMenu oTestMenu对象
     * @return int
    **/
    @Override
    public int save(oTestMenu oTestMenu) {
        return mapper.save(oTestMenu);
    }

    /**
     * 功能简介: 删除
     * @Author dongmufengchun
     * @Date 19:49 2022/6/19
     * @param id 公司id
     * @return int
    **/
    @Override
    public int delete(Long id) {
        return mapper.delete(id);
    }

    /**
     * 功能简介: 修改
     * @Author dongmufengchun
     * @Date 19:50 2022/6/19
     * @param oTestMenu oTestMenu对象
     * @return int
    **/
    @Override
    public int update(oTestMenu oTestMenu) {
        return mapper.update(oTestMenu);
    }

    /**
     * 功能简介: 根据id进行查询
     * @Author dongmufengchun
     * @Date 19:50 2022/6/19
     * @param id 公司id
     * @return com.example.htmlspringtest.entity.oTestMenu
    **/
    @Override
    public oTestMenu findById(Long id) {
        return mapper.findById(id);
    }
}

